package com.xbai.spark.recall.data

import org.apache.spark.sql.{DataFrame, SparkSession}

/**
  * @author xbai
  * @Date 2021/1/11
  */
object DBDataLoader {

  def getUserRemainData(spark: SparkSession): DataFrame = {
    val remain: DataFrame = spark.sql("select * from mremain")
    remain
  }

  def getItemData(spark: SparkSession): DataFrame = {
    val item: DataFrame = spark.sql("select * from mitem")
    item
  }


  def getUserData(spark: SparkSession): DataFrame = {
    val user: DataFrame = spark.sql("select * from muser")
    user
  }
}
